package me.spring.cloud.common.components.response.service;

import java.util.List;
import me.spring.cloud.common.components.rpc.response.CommonResponse;
import me.spring.cloud.common.components.util.enums.CodedEnum;

/**
 * @author luffy
 * @date 2020-04-17 22:14
 */
public interface ResponseService {
  <T> CommonResponse<T> success();

  <T> CommonResponse<T> success(T t);

  <T> CommonResponse<T> error();

  <T> CommonResponse<T> error(CodedEnum codedEnum);

  <T> CommonResponse<T> error(Object code);

  <T> CommonResponse<T> errorBody(T body);
  
  <T> CommonResponse<T> error(String message);

  <T> CommonResponse<T> error(Object code, String message);

  List<String> getIgnoreUrls();
}
